<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>wps - 跳转中间页</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
    <!--
        来源：
    -->
    <div class="component-modal-wrap">
        <div class="component-modal component-confirm link-page-modal" tabindex="1">
            <div class="modal-body" style="left: calc(50% - 225px); top: calc(50% - 78px);">
                <div class="dialog-header">
                    <div class="header-title">即将离开金山文档 | WPS云文档</div>
                    <div class="component-icon-btn close-btn" role="button">
                        <i class="icons icons-16 icons-16-close"></i>
                    </div>
                </div>
                <div class="dialog-content">
                    <div class="wrap">
                        <p class="content">你即将通过访问链接离开金山文档，请注意你的账号和信息安全，建议谨慎访问。
                            <!--
                            如有违法内容违规内容可 
                            <a
                                class="kd-link report-link kd-link-primary" href="#" target="_blank">
                                <span class="kd-link-inner">举报文档</span>
                            </a>
                        -->
                        </p>
                        <div class="link">
                            <div class="url">你访问的是：https://3.cn/2-4kooxV</div>
                            <i class="icons icons-16" alt="复制链接" title="复制链接" onclick="copyText()">

                                <svg width="16" height="16" xmlns="http://www.w3.org/2000/svg">
                                    <g fill="#949AAE" fill-rule="evenodd">
                                        <path d="M5 11v2h8V5h-2V4h2a1 1 0 011 1v8a1 1 0 01-1 1H5a1 1 0 01-1-1v-2h1z"
                                            fill-rule="nonzero" />
                                        <path
                                            d="M10 1a1 1 0 011 1v8a1 1 0 01-1 1H2a1 1 0 01-1-1V2a1 1 0 011-1h8zm0 1H2v8h8V2z" />
                                        <path d="M4 4h4v1H4zm0 3h4v1H4z" />
                                    </g>
                                </svg>
                            </i>
                        </div>

                        <!--
                        <div class="component-checkbox unknown skip-checkbox" role="checkbox">
                            <div class="checkbox-icon"></div>
                            <div class="checkbox-text">不再接收此提醒</div>
                        </div>
                        -->

                    </div>
                </div>
                <div class="dialog-foot">
                    <div class="component-text-btn cancel-btn" role="button" onclick="closePage()">停止访问</div>
                    <div class="component-text-btn confirm-btn" role="button" onclick="redirectToLink()">继续访问</div>
                </div>
            </div>
        </div>
    </div>
    <script>
        //复制
        async function copyText() {
            try {
                await navigator.clipboard.writeText('666999');
                alert('复制成功！');
            } catch (err) {
                console.error('Failed to copy text: ', err);
                alert('复制失败！');
            }
        }

        //关闭页面
        function closePage() {
            window.close(); // 关闭当前窗口
            console.log('关闭页面');
        }

        //打开链接
        function redirectToLink() {
            window.location.href = 'https://www.example.com'; // 替换成你要跳转的链接
        }

    </script>

</body>

</html>